class ItemReviewVote < ActiveRecord::Base
  belongs_to :item_review
  belongs_to :review

  validates_presence_of :user_id, :item_review_id,:vote
  validates_uniqueness_of :user_id, :scope =>"item_review_id" #一个用户对一个评论只能投票一次

end
